package com.itcast.ssm.controller;


import com.itcast.ssm.pojo.House;
import com.itcast.ssm.pojo.User;
import com.itcast.ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author 三人行
 * @since 2020-09-12
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;

    @GetMapping(value = "")
    public User findById(@RequestParam(value = "user_id") Integer userId) {
        User user = userService.findById(userId);
        return user;
    }
}

